<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@ include file="/page/taglibs.jsp" %>
<%@ taglib prefix="sec" uri="http://www.springframework.org/security/tags" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
<title>${appName}-应用运维管理</title>
<%@ include file="/adapter/adapter-macms.jsp" %>
<%@ include file="/adapter/adapter-easyui.jsp" %>
<script src="${ctx}/res/common/js/jquery.min.js" type="text/javascript"></script>
</head>
<body class="easyui-layout">
<div data-options="region:'north',border:false" style="height:44px;padding:0px;overflow:hidden">
      <div style='display:none'><input type='hidden' name='csrfmiddlewaretoken' value='4v3pUgaR902n7bgrswCbuCLXlo9vAKuk' /></div>
      <div id="header">
        <div id="branding">
          <p id="name"><a title="JSFiddle " href="/" id="home"><span>&alpha;</span></a></p>
        </div>
        <div id="actions">
	<ul class="actionCont collapsed" id="toggleSidebarUl">
		<li class="actionItem"><a class="aiButton" id="toggleSidebar" title="Toggle sidebar" href="#toggle-sidebar"><span>Hide sidebar</span></a></li>
  </ul>
	<ul class="actionCont collapsed">
		<li class="actionItem">
			<a class="aiButton" id="run" title="Run (CTRL + Return)" href="#run" onclick="showTreeMenuBar('menu_app1');"><span class="icon-caret-right"></span>应用编译打包</a>
		</li>
		<li class="actionItem">
			<a class="aiButton" id="run" title="Run (CTRL + Return)" href="#run" onclick="showTreeMenuBar('menu_app2');"><span class="icon-caret-right"></span>应用版本管理</a>
		</li>
		<li class="actionItem">
			<a class="aiButton" id="run" title="Run (CTRL + Return)" href="#run" onclick="showTreeMenuBar('menu_app3');"><span class="icon-caret-right"></span>应用发布管理</a>
		</li>			
		<li class="actionItem">
			<a class="aiButton" id="run" title="Run (CTRL + Return)" href="#run" onclick="showTreeMenuBar('menu_app4');"><span class="icon-caret-right"></span>应用运维日志</a>
		</li>				
  </ul>
	</div>
   </div>
</div>
<div data-options="region:'west',title:'导航栏'" style="width:233px;padding:1px;">
	<ul class="easyui-tree" data-options="animate:true,lines:true" id="menu_app1">
			<li>
				<span>应用编译打包</span>
				<ul>
					<li>
						<span><a href='${ctx}/make/appenv?appid=${appid}' target="centerFrame">ANT环境设置</a></span>
					</li>
					<li>
						<span><a id="a3" href='${ctx}/make/readyCompile?appid=${appid}' target="centerFrame">全量编译与打包</a></span>
					</li>
					<li>
						<span><a id="a3" href='${ctx}/make/readyCompile?appid=${appid}' target="centerFrame">增量编译与打包</a></span>
					</li>					
					<li>
						<span><a href='${ctx}/make/appCompileList?appid=${appid}' target="centerFrame">历史记录</a></span>
					</li>
				</ul>
			</li>
	</ul>
	<ul class="easyui-tree" data-options="animate:true,lines:true" id="menu_app2">
			<li>
				<span>应用版本管理</span>
				<ul>
						<li>
							<span><a href='${ctx}/appVersion/appVersionList?appid=${appid}' target="centerFrame">应用版本管理</a></span>
						</li>					
				</ul>
			</li>
	</ul>
	<ul class="easyui-tree" data-options="animate:true,lines:true" id="menu_app3">
			<li>
				<span>应用发布管理</span>
				<ul>
						<li>
							<span><a href='${ctx}/itom/appServerList?appid=${appid}' target="centerFrame">应用服务器</a></span>
						</li>					
				</ul>
			</li>
	</ul>		
	<ul class="easyui-tree" data-options="animate:true,lines:true" id="menu_app4">
			<li>
				<span>应用性能分析</span>
				<ul>
						<li>
							<span><a href='${ctx}/monitor/monitor?appid=${appid}' target="centerFrame">交易执行时间</a></span>
						</li>
						<li>
							<span><a href='${ctx}/monitor/monitor?appid=${appid}' target="centerFrame">交易执行分析</a></span>
						</li>										
						<li>
							<span><a href='${ctx}/monitor/monitor?appid=${appid}' target="centerFrame">系统日志监控</a></span>
						</li>
						<li>
							<span><a id='ca' href='#' target="centerFrame">通讯前置监控</a></span>
						</li>
						<li>
							<span><a href='${ctx}/monitor/resources?appid=${appid}' target="centerFrame">资源负载监控</a></span>
						</li>
				</ul>
			</li>
		</ul>	
</div>
<div data-options="region:'center',title:' '">
<iframe id="infoFrame" name="centerFrame" src="${ctx}/make/readyCompile?appid=${appid}" height="100%" width="100%" frameborder="0" scrolling="auto"></iframe>
</div>
</body>
</html>
<script>
$(function() {
	//使用javascript初始化
	$('#menu_app1').hide();
	$('#menu_app2').hide();
	$('#menu_app3').hide();
	$('#menu_app4').hide();
	showTreeMenuBar("menu_app1");
	var caUrl = "${ctx}/monitor/communication?appid=${appid}&appName=" + encodeURI(encodeURI('${appName}'));
	document.getElementById("ca").href = caUrl;	
});
</script>